package com.smallstep.apilimit.properties;


import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 李俊
 * @Description
 * @Date 2019/9/3 15:31
 */
@ConfigurationProperties(prefix = "ff.http.api")
public class ApiLimitProperties {

    private boolean enabled = false;

    private boolean distribute = false;

    private Map<String,ApiLimitGroupProperties> settings = new HashMap<>();


    public boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public Map<String, ApiLimitGroupProperties> getSettings() {
        return settings;
    }

    public void setSettings(Map<String, ApiLimitGroupProperties> settings) {
        this.settings = settings;
    }

    public boolean isEnabled() {
        return enabled;
    }

    public boolean isDistribute() {
        return distribute;
    }

    public void setDistribute(boolean distribute) {
        this.distribute = distribute;
    }
}
